<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
$return=array();
if($_RQ['op']=='get'){
	$page=core_setting('site');
	$return=array(
		'verify_code'=>$_AR['system']['verify_code'],
		'logo'=>$page['logo'],
		'item'=>array()
	);
	$return['navs']=array();
	if($_SESSION['os'] == 'mobile'){
		$return['sharedata']=array(
		'title' => '小程序智能生成,多应用打包，DIY小程序-'.$page['name'],
		);
	}
	$styles=get_plugin_styles();
	$intypes=get_plugin_intypes();
	$inlist=array();
	foreach($intypes as $k=>&$inv){
			if($k){
				$inlist[$k]['title']=$inv;
			}else{
				$inlist[18]['title']=$inv;
			}
	}
	unset($styles['1'],$styles['2']);
	$pindex = max(1, intval($_RQ['page']));
	$psize = 20;
	$total='';
	$orderby='`paixu` desc, `tuijie` desc ,`price` desc, `id` desc';
	foreach($inlist as $ki=>&$iv){
		$inlist[$ki]['apps'] = pdo_getall('core_plugins',array('intype'=>$ki,'hide'=>0,'is_legao'=>1),array('id','intype','style','name','title','image','description'),'id',$orderby);
		if($inlist[$ki]['apps']){
			foreach($inlist[$ki]['apps'] as &$ia){
				$ia['url']=custom_url($ia['name'].'/index/&current_plugin='.$ia['name'].'&fromh5wxapp='.$_SESSION['fromh5wxapp'],true,1);
			}
		}
	}
	$return['list']=$inlist;
	$operating=core_setting('operating');
	$return['site']=$page;
	$return['operating']=$operating;
	$return['navs']=$page['hdps'];
	set_html('header','common/header-cms');
	set_html('title','小程序智能生成-'.$page['title']);
	exi($return);
}
?>